{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The model below is converted from PyTorch's Torchvision module. The original model source can be found [here](https://github.com/pytorch/vision/tree/master/torchvision/models/segmentation/fcn.py). The conversion process follows the procedure outlined in [the PyTorch ONNX documentation](https://pytorch.org/docs/stable/onnx.html), also borrowing from the [RetinaNet conversion](../../retinanet/README.md) in this repository.\n",
    "\n",
    "This code requires PyTorch and Torchvision to be installed."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from PIL import Image\n",
    "import numpy as np\n",
    "from onnx import numpy_helper\n",
    "import os\n",
    "import onnxruntime as rt\n",
    "import torch\n",
    "from torchvision import transforms, models\n",
    "import urllib"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Utility functions to save the model and test data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def flatten(inputs):\n",
    "    return [[flatten(i) for i in inputs] if isinstance(inputs, (list, tuple)) else inputs]\n",
    "\n",
    "\n",
    "def update_flatten_list(inputs, res_list):\n",
    "    for i in inputs:\n",
    "        res_list.append(i) if not isinstance(i, (list, tuple)) else update_flatten_list(i, res_list)\n",
    "    return res_list\n",
    "\n",
    "def full_flatten(inputs):\n",
    "    inputs_flatten = flatten(inputs)\n",
    "    return update_flatten_list(inputs_flatten, [])\n",
    "\n",
    "\n",
    "def to_numpy(x):\n",
    "    if type(x) is not np.ndarray:\n",
    "        x = x.detach().cpu().numpy() if x.requires_grad else x.cpu().numpy()\n",
    "    return x\n",
    "\n",
    "\n",
    "def save_tensor_proto(file_path, name, data):\n",
    "    tp = numpy_helper.from_array(data)\n",
    "    tp.name = name\n",
    "\n",
    "    with open(file_path, 'wb') as f:\n",
    "        f.write(tp.SerializeToString())\n",
    "\n",
    "\n",
    "def save_data(test_data_dir, prefix, names, data_list):\n",
    "    if isinstance(data_list, torch.autograd.Variable) or isinstance(data_list, torch.Tensor):\n",
    "        data_list = [data_list]\n",
    "    for i, d in enumerate(data_list):\n",
    "        d = d.data.cpu().numpy()\n",
    "        save_tensor_proto(os.path.join(test_data_dir, '{0}_{1}.pb'.format(prefix, i)), names[i], d)\n",
    "\n",
    "\n",
    "def save_model(name, model, data_dir, inputs, outputs, input_names=None, output_names=None, **kwargs):\n",
    "    if hasattr(model, 'train'):\n",
    "        model.train(False)\n",
    "    output_dir = './'\n",
    "    if not os.path.exists(output_dir):\n",
    "        os.makedirs(output_dir)\n",
    "    output_dir = os.path.join(output_dir, 'test_' + name)\n",
    "    if not os.path.exists(output_dir):\n",
    "        os.makedirs(output_dir)\n",
    "\n",
    "    inputs_flatten = full_flatten(inputs)\n",
    "    outputs_flatten = full_flatten(outputs)\n",
    "    if input_names is None:\n",
    "        input_names = []\n",
    "        for i, _ in enumerate(inputs_flatten):\n",
    "            input_names.append('input' + str(i+1))\n",
    "    else:\n",
    "        np.testing.assert_equal(len(input_names), len(inputs_flatten),\n",
    "                                \"Number of input names provided is not equal to the number of inputs.\")\n",
    "\n",
    "    if output_names is None:\n",
    "        output_names = []\n",
    "        for i, _ in enumerate(outputs_flatten):\n",
    "            output_names.append('output' + str(i+1))\n",
    "    else:\n",
    "        np.testing.assert_equal(len(output_names), len(outputs_flatten),\n",
    "                                \"Number of output names provided is not equal to the number of output.\")\n",
    "\n",
    "    model_path = os.path.join(output_dir, 'model.onnx')\n",
    "    torch.onnx.export(model, inputs, model_path, verbose=True, input_names=input_names,\n",
    "                      output_names=output_names, example_outputs=outputs, **kwargs)\n",
    "\n",
    "    test_data_dir = os.path.join(output_dir, data_dir)\n",
    "    if not os.path.exists(test_data_dir):\n",
    "        os.makedirs(test_data_dir)\n",
    "\n",
    "    save_data(test_data_dir, \"input\", input_names, inputs_flatten)\n",
    "    save_data(test_data_dir, \"output\", output_names, outputs_flatten)\n",
    "\n",
    "    return model_path, test_data_dir"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Utility functions to run inference on the PyTorch and ORT models"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "def torch_inference(model, input):\n",
    "    print(\"====== Torch Inference ======\")\n",
    "    output=model(input)\n",
    "    return output\n",
    "\n",
    "\n",
    "def ort_inference(file, inputs, outputs=None):\n",
    "    print(\"====== ORT Inference ======\")\n",
    "    inputs_flatten = full_flatten(inputs)\n",
    "    outputs_flatten = full_flatten(outputs)\n",
    "\n",
    "    # Start from ORT 1.10, ORT requires explicitly setting the providers parameter if you want to use execution providers\n",
    "    # other than the default CPU provider (as opposed to the previous behavior of providers getting set/registered by default\n",
    "    # based on the build flags) when instantiating InferenceSession.\n",
    "    # For example, if NVIDIA GPU is available and ORT Python package is built with CUDA, then call API as following:\n",
    "    # onnxruntime.InferenceSession(path/to/model, providers=['CUDAExecutionProvider'])\n",
    "    sess = rt.InferenceSession(file)\n",
    "    ort_inputs = dict((sess.get_inputs()[i].name, to_numpy(input)) for i, input in enumerate(inputs_flatten))\n",
    "    res = sess.run(None, ort_inputs)\n",
    "\n",
    "    if outputs is not None:\n",
    "        print(\"== Checking model output ==\")\n",
    "        [np.testing.assert_allclose(to_numpy(output), res[i], rtol=1e-03, atol=2e-04) for i, output in enumerate(outputs_flatten)]\n",
    "    \n",
    "    print(\"== Done ==\")\n",
    "    return res"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Step 1: Download models from PyTorch's model zoo\n",
    "Memory constraints mean that only one model may be converted at a time. A boolean variable controls which one will be converted first."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "DO_101 = True\n",
    "\n",
    "if DO_101:\n",
    "    model = models.segmentation.fcn_resnet101(pretrained=True)\n",
    "else:\n",
    "    model = models.segmentation.fcn_resnet50(pretrained=True)\n",
    "\n",
    "model.eval()\n",
    "model.exporting = True"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Step 2: Preprocess, run PyTorch inference on test images"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "====== Torch Inference ======\n"
     ]
    }
   ],
   "source": [
    "data_dir = 'test_data_set_0'\n",
    "url, filename = (\"https://github.com/onnx/models/raw/main/vision/object_detection_segmentation/fcn/dependencies/000000017968.jpg\", \"000000017968.jpg\")\n",
    "#url, filename = (\"https://github.com/onnx/models/raw/main/vision/object_detection_segmentation/fcn/dependencies/000000025205.jpg\", \"000000025205.jpg\")\n",
    "#urllib.request.urlretrieve(url, filename)\n",
    "\n",
    "input_image = Image.open(filename)\n",
    "preprocess = transforms.Compose([\n",
    "    transforms.ToTensor(),\n",
    "    transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),\n",
    "])\n",
    "input_tensor = preprocess(input_image)\n",
    "input_tensor = input_tensor.unsqueeze(0)\n",
    "output = torch_inference(model, input_tensor)\n",
    "output_tensor, aux_tensor = output['out'], output['aux']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Step 3: Save ONNX Models\n",
    "This model can take in arbitrary resolutions/batch sizes, so specify that using PyTorch's `dynamic_axes` parameter when exporting the model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "graph(%input : Float(1:921600, 3:307200, 480:640, 640:1, requires_grad=0, device=cpu),\n",
      "      %classifier.4.weight : Float(21:512, 512:1, 1:1, 1:1, requires_grad=1, device=cpu),\n",
      "      %classifier.4.bias : Float(21:1, requires_grad=1, device=cpu),\n",
      "      %aux_classifier.4.weight : Float(21:256, 256:1, 1:1, 1:1, requires_grad=1, device=cpu),\n",
      "      %aux_classifier.4.bias : Float(21:1, requires_grad=1, device=cpu),\n",
      "      %1024 : Float(64:147, 3:49, 7:7, 7:1, requires_grad=0, device=cpu),\n",
      "      %1025 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1027 : Float(64:64, 64:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1028 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1030 : Float(64:576, 64:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1031 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1033 : Float(256:64, 64:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1034 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1036 : Float(256:64, 64:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1037 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1039 : Float(64:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1040 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1042 : Float(64:576, 64:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1043 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1045 : Float(256:64, 64:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1046 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1048 : Float(64:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1049 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1051 : Float(64:576, 64:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1052 : Float(64:1, requires_grad=0, device=cpu),\n",
      "      %1054 : Float(256:64, 64:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1055 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1057 : Float(128:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1058 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1060 : Float(128:1152, 128:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1061 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1063 : Float(512:128, 128:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1064 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1066 : Float(512:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1067 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1069 : Float(128:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1070 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1072 : Float(128:1152, 128:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1073 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1075 : Float(512:128, 128:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1076 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1078 : Float(128:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1079 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1081 : Float(128:1152, 128:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1082 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1084 : Float(512:128, 128:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1085 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1087 : Float(128:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1088 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1090 : Float(128:1152, 128:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1091 : Float(128:1, requires_grad=0, device=cpu),\n",
      "      %1093 : Float(512:128, 128:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1094 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1096 : Float(256:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1097 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1099 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1100 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1102 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1103 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1105 : Float(1024:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1106 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1108 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1109 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1111 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1112 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1114 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1115 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1117 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1118 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1120 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1121 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1123 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1124 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1126 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1127 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1129 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1130 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1132 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1133 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1135 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1136 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1138 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1139 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1141 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1142 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1144 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1145 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1147 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1148 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1150 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1151 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1153 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1154 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1156 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1157 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1159 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1160 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1162 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1163 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1165 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1166 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1168 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1169 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1171 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1172 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1174 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1175 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1177 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1178 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1180 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1181 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1183 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1184 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1186 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1187 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1189 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1190 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1192 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1193 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1195 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1196 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1198 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1199 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1201 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1202 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1204 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1205 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1207 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1208 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1210 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1211 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1213 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1214 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1216 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1217 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1219 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1220 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1222 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1223 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1225 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1226 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1228 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1229 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1231 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1232 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1234 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1235 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1237 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1238 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1240 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1241 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1243 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1244 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1246 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1247 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1249 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1250 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1252 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1253 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1255 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1256 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1258 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1259 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1261 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1262 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1264 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1265 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1267 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1268 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1270 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1271 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1273 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1274 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1276 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1277 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1279 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1280 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1282 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1283 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1285 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1286 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1288 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1289 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1291 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1292 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1294 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1295 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1297 : Float(256:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1298 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1300 : Float(256:2304, 256:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1301 : Float(256:1, requires_grad=0, device=cpu),\n",
      "      %1303 : Float(1024:256, 256:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1304 : Float(1024:1, requires_grad=0, device=cpu),\n",
      "      %1306 : Float(512:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1307 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1309 : Float(512:4608, 512:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1310 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1312 : Float(2048:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1313 : Float(2048:1, requires_grad=0, device=cpu),\n",
      "      %1315 : Float(2048:1024, 1024:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1316 : Float(2048:1, requires_grad=0, device=cpu),\n",
      "      %1318 : Float(512:2048, 2048:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1319 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1321 : Float(512:4608, 512:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1322 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1324 : Float(2048:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1325 : Float(2048:1, requires_grad=0, device=cpu),\n",
      "      %1327 : Float(512:2048, 2048:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1328 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1330 : Float(512:4608, 512:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1331 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1333 : Float(2048:512, 512:1, 1:1, 1:1, requires_grad=0, device=cpu),\n",
      "      %1334 : Float(2048:1, requires_grad=0, device=cpu),\n",
      "      %1336 : Float(512:18432, 2048:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1337 : Float(512:1, requires_grad=0, device=cpu),\n",
      "      %1339 : Float(256:9216, 1024:9, 3:3, 3:1, requires_grad=0, device=cpu),\n",
      "      %1340 : Float(256:1, requires_grad=0, device=cpu)):\n",
      "  %641 : Tensor = onnx::Shape(%input)\n",
      "  %642 : Tensor = onnx::Constant[value={2}]()\n",
      "  %643 : Long(device=cpu) = onnx::Gather[axis=0](%641, %642) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torchvision\\models\\segmentation\\_utils.py:18:0\n",
      "  %644 : Tensor = onnx::Shape(%input)\n",
      "  %645 : Tensor = onnx::Constant[value={3}]()\n",
      "  %646 : Long(device=cpu) = onnx::Gather[axis=0](%644, %645) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torchvision\\models\\segmentation\\_utils.py:18:0\n",
      "  %1023 : Float(1:4915200, 64:76800, 240:320, 320:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[7, 7], pads=[3, 3, 3, 3], strides=[2, 2]](%input, %1024, %1025)\n",
      "  %649 : Float(1:4915200, 64:76800, 240:320, 320:1, requires_grad=1, device=cpu) = onnx::Relu(%1023) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %650 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::MaxPool[ceil_mode=0, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[2, 2]](%649) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:585:0\n",
      "  %1026 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%650, %1027, %1028)\n",
      "  %653 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1026) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1029 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%653, %1030, %1031)\n",
      "  %656 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1029) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1032 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%656, %1033, %1034)\n",
      "  %1035 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%650, %1036, %1037)\n",
      "  %661 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Add(%1032, %1035)\n",
      "  %662 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%661) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1038 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%662, %1039, %1040)\n",
      "  %665 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1038) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1041 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%665, %1042, %1043)\n",
      "  %668 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1041) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1044 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%668, %1045, %1046)\n",
      "  %671 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Add(%1044, %662)\n",
      "  %672 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%671) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1047 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%672, %1048, %1049)\n",
      "  %675 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1047) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1050 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%675, %1051, %1052)\n",
      "  %678 : Float(1:1228800, 64:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1050) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1053 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%678, %1054, %1055)\n",
      "  %681 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Add(%1053, %672)\n",
      "  %682 : Float(1:4915200, 256:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%681) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1056 : Float(1:2457600, 128:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%682, %1057, %1058)\n",
      "  %685 : Float(1:2457600, 128:19200, 120:160, 160:1, requires_grad=1, device=cpu) = onnx::Relu(%1056) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1059 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[2, 2]](%685, %1060, %1061)\n",
      "  %688 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1059) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1062 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%688, %1063, %1064)\n",
      "  %1065 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[2, 2]](%682, %1066, %1067)\n",
      "  %693 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1062, %1065)\n",
      "  %694 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%693) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1068 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%694, %1069, %1070)\n",
      "  %697 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1068) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1071 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%697, %1072, %1073)\n",
      "  %700 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1071) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1074 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%700, %1075, %1076)\n",
      "  %703 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1074, %694)\n",
      "  %704 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%703) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1077 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%704, %1078, %1079)\n",
      "  %707 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1077) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1080 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%707, %1081, %1082)\n",
      "  %710 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1080) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1083 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%710, %1084, %1085)\n",
      "  %713 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1083, %704)\n",
      "  %714 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%713) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1086 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%714, %1087, %1088)\n",
      "  %717 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1086) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1089 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%717, %1090, %1091)\n",
      "  %720 : Float(1:614400, 128:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1089) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1092 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%720, %1093, %1094)\n",
      "  %723 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1092, %714)\n",
      "  %724 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%723) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1095 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%724, %1096, %1097)\n",
      "  %727 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1095) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1098 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%727, %1099, %1100)\n",
      "  %730 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1098) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1101 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%730, %1102, %1103)\n",
      "  %1104 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%724, %1105, %1106)\n",
      "  %735 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1101, %1104)\n",
      "  %736 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%735) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1107 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%736, %1108, %1109)\n",
      "  %739 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1107) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1110 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%739, %1111, %1112)\n",
      "  %742 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1110) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1113 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%742, %1114, %1115)\n",
      "  %745 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1113, %736)\n",
      "  %746 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%745) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1116 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%746, %1117, %1118)\n",
      "  %749 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1116) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1119 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%749, %1120, %1121)\n",
      "  %752 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1119) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1122 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%752, %1123, %1124)\n",
      "  %755 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1122, %746)\n",
      "  %756 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%755) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1125 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%756, %1126, %1127)\n",
      "  %759 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1125) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1128 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%759, %1129, %1130)\n",
      "  %762 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1128) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1131 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%762, %1132, %1133)\n",
      "  %765 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1131, %756)\n",
      "  %766 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%765) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1134 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%766, %1135, %1136)\n",
      "  %769 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1134) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1137 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%769, %1138, %1139)\n",
      "  %772 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1137) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1140 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%772, %1141, %1142)\n",
      "  %775 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1140, %766)\n",
      "  %776 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%775) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1143 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%776, %1144, %1145)\n",
      "  %779 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1143) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1146 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%779, %1147, %1148)\n",
      "  %782 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1146) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1149 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%782, %1150, %1151)\n",
      "  %785 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1149, %776)\n",
      "  %786 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%785) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1152 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%786, %1153, %1154)\n",
      "  %789 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1152) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1155 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%789, %1156, %1157)\n",
      "  %792 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1155) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1158 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%792, %1159, %1160)\n",
      "  %795 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1158, %786)\n",
      "  %796 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%795) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1161 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%796, %1162, %1163)\n",
      "  %799 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1161) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1164 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%799, %1165, %1166)\n",
      "  %802 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1164) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1167 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%802, %1168, %1169)\n",
      "  %805 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1167, %796)\n",
      "  %806 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%805) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1170 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%806, %1171, %1172)\n",
      "  %809 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1170) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1173 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%809, %1174, %1175)\n",
      "  %812 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1173) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1176 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%812, %1177, %1178)\n",
      "  %815 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1176, %806)\n",
      "  %816 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%815) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1179 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%816, %1180, %1181)\n",
      "  %819 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1179) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1182 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%819, %1183, %1184)\n",
      "  %822 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1182) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1185 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%822, %1186, %1187)\n",
      "  %825 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1185, %816)\n",
      "  %826 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%825) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1188 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%826, %1189, %1190)\n",
      "  %829 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1188) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1191 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%829, %1192, %1193)\n",
      "  %832 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1191) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1194 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%832, %1195, %1196)\n",
      "  %835 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1194, %826)\n",
      "  %836 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%835) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1197 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%836, %1198, %1199)\n",
      "  %839 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1197) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1200 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%839, %1201, %1202)\n",
      "  %842 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1200) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1203 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%842, %1204, %1205)\n",
      "  %845 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1203, %836)\n",
      "  %846 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%845) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1206 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%846, %1207, %1208)\n",
      "  %849 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1206) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1209 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%849, %1210, %1211)\n",
      "  %852 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1209) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1212 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%852, %1213, %1214)\n",
      "  %855 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1212, %846)\n",
      "  %856 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%855) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1215 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%856, %1216, %1217)\n",
      "  %859 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1215) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1218 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%859, %1219, %1220)\n",
      "  %862 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1218) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1221 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%862, %1222, %1223)\n",
      "  %865 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1221, %856)\n",
      "  %866 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%865) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1224 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%866, %1225, %1226)\n",
      "  %869 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1224) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1227 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%869, %1228, %1229)\n",
      "  %872 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1227) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1230 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%872, %1231, %1232)\n",
      "  %875 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1230, %866)\n",
      "  %876 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%875) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1233 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%876, %1234, %1235)\n",
      "  %879 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1233) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1236 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%879, %1237, %1238)\n",
      "  %882 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1236) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1239 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%882, %1240, %1241)\n",
      "  %885 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1239, %876)\n",
      "  %886 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%885) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1242 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%886, %1243, %1244)\n",
      "  %889 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1242) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1245 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%889, %1246, %1247)\n",
      "  %892 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1245) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1248 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%892, %1249, %1250)\n",
      "  %895 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1248, %886)\n",
      "  %896 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%895) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1251 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%896, %1252, %1253)\n",
      "  %899 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1251) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1254 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%899, %1255, %1256)\n",
      "  %902 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1254) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1257 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%902, %1258, %1259)\n",
      "  %905 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1257, %896)\n",
      "  %906 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%905) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1260 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%906, %1261, %1262)\n",
      "  %909 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1260) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1263 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%909, %1264, %1265)\n",
      "  %912 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1263) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1266 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%912, %1267, %1268)\n",
      "  %915 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1266, %906)\n",
      "  %916 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%915) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1269 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%916, %1270, %1271)\n",
      "  %919 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1269) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1272 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%919, %1273, %1274)\n",
      "  %922 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1272) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1275 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%922, %1276, %1277)\n",
      "  %925 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1275, %916)\n",
      "  %926 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%925) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1278 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%926, %1279, %1280)\n",
      "  %929 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1278) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1281 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%929, %1282, %1283)\n",
      "  %932 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1281) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1284 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%932, %1285, %1286)\n",
      "  %935 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1284, %926)\n",
      "  %936 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%935) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1287 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%936, %1288, %1289)\n",
      "  %939 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1287) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1290 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%939, %1291, %1292)\n",
      "  %942 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1290) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1293 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%942, %1294, %1295)\n",
      "  %945 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1293, %936)\n",
      "  %946 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%945) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1296 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%946, %1297, %1298)\n",
      "  %949 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1296) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1299 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%949, %1300, %1301)\n",
      "  %952 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1299) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1302 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%952, %1303, %1304)\n",
      "  %955 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1302, %946)\n",
      "  %956 : Float(1:4915200, 1024:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%955) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1305 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%956, %1306, %1307)\n",
      "  %959 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1305) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1308 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[2, 2], group=1, kernel_shape=[3, 3], pads=[2, 2, 2, 2], strides=[1, 1]](%959, %1309, %1310)\n",
      "  %962 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1308) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1311 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%962, %1312, %1313)\n",
      "  %1314 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%956, %1315, %1316)\n",
      "  %967 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1311, %1314)\n",
      "  %968 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%967) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1317 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%968, %1318, %1319)\n",
      "  %971 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1317) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1320 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[4, 4], group=1, kernel_shape=[3, 3], pads=[4, 4, 4, 4], strides=[1, 1]](%971, %1321, %1322)\n",
      "  %974 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1320) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1323 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%974, %1324, %1325)\n",
      "  %977 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1323, %968)\n",
      "  %978 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%977) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1326 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%978, %1327, %1328)\n",
      "  %981 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1326) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1329 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[4, 4], group=1, kernel_shape=[3, 3], pads=[4, 4, 4, 4], strides=[1, 1]](%981, %1330, %1331)\n",
      "  %984 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1329) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1332 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%984, %1333, %1334)\n",
      "  %987 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Add(%1332, %978)\n",
      "  %988 : Float(1:9830400, 2048:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%987) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:1134:0\n",
      "  %1335 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%988, %1336, %1337)\n",
      "  %991 : Float(1:2457600, 512:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1335) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:983:0\n",
      "  %992 : Float(1:100800, 21:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%991, %classifier.4.weight, %classifier.4.bias) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py:419:0\n",
      "  %993 : Tensor = onnx::Unsqueeze[axes=[0]](%643)\n",
      "  %994 : Tensor = onnx::Unsqueeze[axes=[0]](%646)\n",
      "  %995 : Tensor = onnx::Concat[axis=0](%993, %994)\n",
      "  %996 : Tensor = onnx::Constant[value=[ CPUFloatType{0} ]]()\n",
      "  %997 : Tensor = onnx::Shape(%992)\n",
      "  %998 : Tensor = onnx::Constant[value={0}]()\n",
      "  %999 : Tensor = onnx::Constant[value={0}]()\n",
      "  %1000 : Tensor = onnx::Constant[value={2}]()\n",
      "  %1001 : Tensor = onnx::Slice(%997, %999, %1000, %998)\n",
      "  %1002 : Tensor = onnx::Cast[to=7](%995)\n",
      "  %1003 : Tensor = onnx::Concat[axis=0](%1001, %1002)\n",
      "  %1004 : Tensor = onnx::Constant[value=[ CPUFloatType{0} ]]()\n",
      "  %out : Float(1:6451200, 21:307200, 480:640, 640:1, requires_grad=1, device=cpu) = onnx::Resize[coordinate_transformation_mode=\"pytorch_half_pixel\", cubic_coeff_a=-0.75, mode=\"linear\", nearest_mode=\"floor\"](%992, %996, %1004, %1003) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:3151:0\n",
      "  %1338 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[3, 3], pads=[1, 1, 1, 1], strides=[1, 1]](%956, %1339, %1340)\n",
      "  %1008 : Float(1:1228800, 256:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Relu(%1338) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:983:0\n",
      "  %1009 : Float(1:100800, 21:4800, 60:80, 80:1, requires_grad=1, device=cpu) = onnx::Conv[dilations=[1, 1], group=1, kernel_shape=[1, 1], pads=[0, 0, 0, 0], strides=[1, 1]](%1008, %aux_classifier.4.weight, %aux_classifier.4.bias) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\modules\\conv.py:419:0\n",
      "  %1010 : Tensor = onnx::Unsqueeze[axes=[0]](%643)\n",
      "  %1011 : Tensor = onnx::Unsqueeze[axes=[0]](%646)\n",
      "  %1012 : Tensor = onnx::Concat[axis=0](%1010, %1011)\n",
      "  %1013 : Tensor = onnx::Constant[value=[ CPUFloatType{0} ]]()\n",
      "  %1014 : Tensor = onnx::Shape(%1009)\n",
      "  %1015 : Tensor = onnx::Constant[value={0}]()\n",
      "  %1016 : Tensor = onnx::Constant[value={0}]()\n",
      "  %1017 : Tensor = onnx::Constant[value={2}]()\n",
      "  %1018 : Tensor = onnx::Slice(%1014, %1016, %1017, %1015)\n",
      "  %1019 : Tensor = onnx::Cast[to=7](%1012)\n",
      "  %1020 : Tensor = onnx::Concat[axis=0](%1018, %1019)\n",
      "  %1021 : Tensor = onnx::Constant[value=[ CPUFloatType{0} ]]()\n",
      "  %aux : Float(1:6451200, 21:307200, 480:640, 640:1, requires_grad=1, device=cpu) = onnx::Resize[coordinate_transformation_mode=\"pytorch_half_pixel\", cubic_coeff_a=-0.75, mode=\"linear\", nearest_mode=\"floor\"](%1009, %1013, %1021, %1020) # d:\\documents\\ai\\onnx\\venv\\lib\\site-packages\\torch\\nn\\functional.py:3151:0\n",
      "  return (%out, %aux)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "if DO_101:\n",
    "    model_name = 'fcn_resnet101'\n",
    "else:\n",
    "    model_name = 'fcn_resnet50'\n",
    "\n",
    "model_path, data_dir = save_model(\n",
    "    model_name, model.cpu(),\n",
    "    data_dir,\n",
    "    input_tensor, [output_tensor, aux_tensor],\n",
    "    input_names=['input'], output_names=['out', 'aux'],\n",
    "    dynamic_axes={\n",
    "        'input': {0: 'batch', 2: 'height', 3: 'width'},\n",
    "        'out': {0: 'batch', 2: 'height', 3: 'width'},\n",
    "        'aux': {0: 'batch', 2: 'height', 3: 'width'},\n",
    "    },\n",
    "    opset_version=11\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Step 4 (optional): Test ONNX models vs. the PyTorch outputs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "====== ORT Inference ======\n",
      "== Checking model output ==\n",
      "== Done ==\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[array([[[[ 7.9147706 ,  7.9147706 ,  7.9147706 , ...,  7.9186316 ,\n",
       "            7.9186316 ,  7.9186316 ],\n",
       "          [ 7.9147706 ,  7.9147706 ,  7.9147706 , ...,  7.9186316 ,\n",
       "            7.9186316 ,  7.9186316 ],\n",
       "          [ 7.9147706 ,  7.9147706 ,  7.9147706 , ...,  7.9186316 ,\n",
       "            7.9186316 ,  7.9186316 ],\n",
       "          ...,\n",
       "          [ 7.2662272 ,  7.2662272 ,  7.2662272 , ...,  6.977423  ,\n",
       "            6.977423  ,  6.977423  ],\n",
       "          [ 7.2662272 ,  7.2662272 ,  7.2662272 , ...,  6.977423  ,\n",
       "            6.977423  ,  6.977423  ],\n",
       "          [ 7.2662272 ,  7.2662272 ,  7.2662272 , ...,  6.977423  ,\n",
       "            6.977423  ,  6.977423  ]],\n",
       " \n",
       "         [[-1.1648259 , -1.1648259 , -1.1648259 , ..., -1.9420264 ,\n",
       "           -1.9420264 , -1.9420264 ],\n",
       "          [-1.1648259 , -1.1648259 , -1.1648259 , ..., -1.9420264 ,\n",
       "           -1.9420264 , -1.9420264 ],\n",
       "          [-1.1648259 , -1.1648259 , -1.1648259 , ..., -1.9420264 ,\n",
       "           -1.9420264 , -1.9420264 ],\n",
       "          ...,\n",
       "          [-2.4863462 , -2.4863462 , -2.4863462 , ..., -2.363782  ,\n",
       "           -2.363782  , -2.363782  ],\n",
       "          [-2.4863462 , -2.4863462 , -2.4863462 , ..., -2.363782  ,\n",
       "           -2.363782  , -2.363782  ],\n",
       "          [-2.4863462 , -2.4863462 , -2.4863462 , ..., -2.363782  ,\n",
       "           -2.363782  , -2.363782  ]],\n",
       " \n",
       "         [[-2.3632388 , -2.3632388 , -2.3632388 , ..., -1.7894778 ,\n",
       "           -1.7894778 , -1.7894778 ],\n",
       "          [-2.3632388 , -2.3632388 , -2.3632388 , ..., -1.7894778 ,\n",
       "           -1.7894778 , -1.7894778 ],\n",
       "          [-2.3632388 , -2.3632388 , -2.3632388 , ..., -1.7894778 ,\n",
       "           -1.7894778 , -1.7894778 ],\n",
       "          ...,\n",
       "          [-1.870929  , -1.870929  , -1.870929  , ..., -1.5333816 ,\n",
       "           -1.5333816 , -1.5333816 ],\n",
       "          [-1.870929  , -1.870929  , -1.870929  , ..., -1.5333816 ,\n",
       "           -1.5333816 , -1.5333816 ],\n",
       "          [-1.870929  , -1.870929  , -1.870929  , ..., -1.5333816 ,\n",
       "           -1.5333816 , -1.5333816 ]],\n",
       " \n",
       "         ...,\n",
       " \n",
       "         [[ 4.07014   ,  4.07014   ,  4.07014   , ...,  3.065971  ,\n",
       "            3.065971  ,  3.065971  ],\n",
       "          [ 4.07014   ,  4.07014   ,  4.07014   , ...,  3.065971  ,\n",
       "            3.065971  ,  3.065971  ],\n",
       "          [ 4.07014   ,  4.07014   ,  4.07014   , ...,  3.065971  ,\n",
       "            3.065971  ,  3.065971  ],\n",
       "          ...,\n",
       "          [ 4.8878    ,  4.8878    ,  4.8878    , ...,  3.8292716 ,\n",
       "            3.8292716 ,  3.8292716 ],\n",
       "          [ 4.8878    ,  4.8878    ,  4.8878    , ...,  3.8292716 ,\n",
       "            3.8292716 ,  3.8292716 ],\n",
       "          [ 4.8878    ,  4.8878    ,  4.8878    , ...,  3.8292716 ,\n",
       "            3.8292716 ,  3.8292716 ]],\n",
       " \n",
       "         [[ 0.3819163 ,  0.3819163 ,  0.3819163 , ..., -1.417749  ,\n",
       "           -1.417749  , -1.417749  ],\n",
       "          [ 0.3819163 ,  0.3819163 ,  0.3819163 , ..., -1.417749  ,\n",
       "           -1.417749  , -1.417749  ],\n",
       "          [ 0.3819163 ,  0.3819163 ,  0.3819163 , ..., -1.417749  ,\n",
       "           -1.417749  , -1.417749  ],\n",
       "          ...,\n",
       "          [-0.92758095, -0.92758095, -0.92758095, ..., -0.6534008 ,\n",
       "           -0.6534008 , -0.6534008 ],\n",
       "          [-0.92758095, -0.92758095, -0.92758095, ..., -0.6534008 ,\n",
       "           -0.6534008 , -0.6534008 ],\n",
       "          [-0.92758095, -0.92758095, -0.92758095, ..., -0.6534008 ,\n",
       "           -0.6534008 , -0.6534008 ]],\n",
       " \n",
       "         [[ 0.59105027,  0.59105027,  0.59105027, ...,  1.4703814 ,\n",
       "            1.4703814 ,  1.4703814 ],\n",
       "          [ 0.59105027,  0.59105027,  0.59105027, ...,  1.4703814 ,\n",
       "            1.4703814 ,  1.4703814 ],\n",
       "          [ 0.59105027,  0.59105027,  0.59105027, ...,  1.4703814 ,\n",
       "            1.4703814 ,  1.4703814 ],\n",
       "          ...,\n",
       "          [-0.6669959 , -0.6669959 , -0.6669959 , ...,  0.3173409 ,\n",
       "            0.3173409 ,  0.3173409 ],\n",
       "          [-0.6669959 , -0.6669959 , -0.6669959 , ...,  0.3173409 ,\n",
       "            0.3173409 ,  0.3173409 ],\n",
       "          [-0.6669959 , -0.6669959 , -0.6669959 , ...,  0.3173409 ,\n",
       "            0.3173409 ,  0.3173409 ]]]], dtype=float32),\n",
       " array([[[[ 6.2338715 ,  6.2338715 ,  6.2338715 , ...,  7.5526524 ,\n",
       "            7.5526524 ,  7.5526524 ],\n",
       "          [ 6.2338715 ,  6.2338715 ,  6.2338715 , ...,  7.5526524 ,\n",
       "            7.5526524 ,  7.5526524 ],\n",
       "          [ 6.2338715 ,  6.2338715 ,  6.2338715 , ...,  7.5526524 ,\n",
       "            7.5526524 ,  7.5526524 ],\n",
       "          ...,\n",
       "          [ 6.3462844 ,  6.3462844 ,  6.3462844 , ...,  5.3862643 ,\n",
       "            5.3862643 ,  5.3862643 ],\n",
       "          [ 6.3462844 ,  6.3462844 ,  6.3462844 , ...,  5.3862643 ,\n",
       "            5.3862643 ,  5.3862643 ],\n",
       "          [ 6.3462844 ,  6.3462844 ,  6.3462844 , ...,  5.3862643 ,\n",
       "            5.3862643 ,  5.3862643 ]],\n",
       " \n",
       "         [[-0.6518045 , -0.6518045 , -0.6518045 , ..., -1.5102537 ,\n",
       "           -1.5102537 , -1.5102537 ],\n",
       "          [-0.6518045 , -0.6518045 , -0.6518045 , ..., -1.5102537 ,\n",
       "           -1.5102537 , -1.5102537 ],\n",
       "          [-0.6518045 , -0.6518045 , -0.6518045 , ..., -1.5102537 ,\n",
       "           -1.5102537 , -1.5102537 ],\n",
       "          ...,\n",
       "          [-1.9172863 , -1.9172863 , -1.9172863 , ..., -2.1062589 ,\n",
       "           -2.1062589 , -2.1062589 ],\n",
       "          [-1.9172863 , -1.9172863 , -1.9172863 , ..., -2.1062589 ,\n",
       "           -2.1062589 , -2.1062589 ],\n",
       "          [-1.9172863 , -1.9172863 , -1.9172863 , ..., -2.1062589 ,\n",
       "           -2.1062589 , -2.1062589 ]],\n",
       " \n",
       "         [[-2.4733624 , -2.4733624 , -2.4733624 , ..., -1.7811745 ,\n",
       "           -1.7811745 , -1.7811745 ],\n",
       "          [-2.4733624 , -2.4733624 , -2.4733624 , ..., -1.7811745 ,\n",
       "           -1.7811745 , -1.7811745 ],\n",
       "          [-2.4733624 , -2.4733624 , -2.4733624 , ..., -1.7811745 ,\n",
       "           -1.7811745 , -1.7811745 ],\n",
       "          ...,\n",
       "          [-1.4641536 , -1.4641536 , -1.4641536 , ..., -1.4010845 ,\n",
       "           -1.4010845 , -1.4010845 ],\n",
       "          [-1.4641536 , -1.4641536 , -1.4641536 , ..., -1.4010845 ,\n",
       "           -1.4010845 , -1.4010845 ],\n",
       "          [-1.4641536 , -1.4641536 , -1.4641536 , ..., -1.4010845 ,\n",
       "           -1.4010845 , -1.4010845 ]],\n",
       " \n",
       "         ...,\n",
       " \n",
       "         [[ 3.4624157 ,  3.4624157 ,  3.4624157 , ...,  1.8587472 ,\n",
       "            1.8587472 ,  1.8587472 ],\n",
       "          [ 3.4624157 ,  3.4624157 ,  3.4624157 , ...,  1.8587472 ,\n",
       "            1.8587472 ,  1.8587472 ],\n",
       "          [ 3.4624157 ,  3.4624157 ,  3.4624157 , ...,  1.8587472 ,\n",
       "            1.8587472 ,  1.8587472 ],\n",
       "          ...,\n",
       "          [ 3.1030025 ,  3.1030025 ,  3.1030025 , ...,  2.2021728 ,\n",
       "            2.2021728 ,  2.2021728 ],\n",
       "          [ 3.1030025 ,  3.1030025 ,  3.1030025 , ...,  2.2021728 ,\n",
       "            2.2021728 ,  2.2021728 ],\n",
       "          [ 3.1030025 ,  3.1030025 ,  3.1030025 , ...,  2.2021728 ,\n",
       "            2.2021728 ,  2.2021728 ]],\n",
       " \n",
       "         [[-0.60361725, -0.60361725, -0.60361725, ..., -1.4219375 ,\n",
       "           -1.4219375 , -1.4219375 ],\n",
       "          [-0.60361725, -0.60361725, -0.60361725, ..., -1.4219375 ,\n",
       "           -1.4219375 , -1.4219375 ],\n",
       "          [-0.60361725, -0.60361725, -0.60361725, ..., -1.4219375 ,\n",
       "           -1.4219375 , -1.4219375 ],\n",
       "          ...,\n",
       "          [-1.4452193 , -1.4452193 , -1.4452193 , ..., -1.1987216 ,\n",
       "           -1.1987216 , -1.1987216 ],\n",
       "          [-1.4452193 , -1.4452193 , -1.4452193 , ..., -1.1987216 ,\n",
       "           -1.1987216 , -1.1987216 ],\n",
       "          [-1.4452193 , -1.4452193 , -1.4452193 , ..., -1.1987216 ,\n",
       "           -1.1987216 , -1.1987216 ]],\n",
       " \n",
       "         [[ 0.34991392,  0.34991392,  0.34991392, ...,  0.39591238,\n",
       "            0.39591238,  0.39591238],\n",
       "          [ 0.34991392,  0.34991392,  0.34991392, ...,  0.39591238,\n",
       "            0.39591238,  0.39591238],\n",
       "          [ 0.34991392,  0.34991392,  0.34991392, ...,  0.39591238,\n",
       "            0.39591238,  0.39591238],\n",
       "          ...,\n",
       "          [-0.8728554 , -0.8728554 , -0.8728554 , ...,  0.77983665,\n",
       "            0.77983665,  0.77983665],\n",
       "          [-0.8728554 , -0.8728554 , -0.8728554 , ...,  0.77983665,\n",
       "            0.77983665,  0.77983665],\n",
       "          [-0.8728554 , -0.8728554 , -0.8728554 , ...,  0.77983665,\n",
       "            0.77983665,  0.77983665]]]], dtype=float32)]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ort_inference(model_path, input_tensor.detach().cpu().numpy(), [output_tensor, aux_tensor])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
